package com.ls.controller.customer.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ls.entity.Customer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

import static com.ls.constant.SystemConstants.PLATFORM_SIGN_CONTENT;

/**
 * @ClassName GetSignModel
 * @Description 查询当前登录用户的签名Model
 * @Author pengyu
 * @Date 2024/6/25 17:14
 * @Version 1.0
 **/
@Data
public class GetSignModel {
    /**
     * 用户id
     */
    private Long customerId;
    /**
     * 手机号
     */
    private String phone;
    /**
     * 短信签名
     */
    private String sign;
    /**
     * 短信签名待审核
     */
    private String signVerify;
    /**
     * 公司名称
     */
    private String compName;
    /**
     * 公司信用代码
     */
    private String creditCode;
    /**
     * 营业执照
     */
    private String signPic;
    /**
     * 法人姓名
     */
    private String legalPersonName;
    /**
     * 法人身份证号码
     */
    private String legalPersonIdCard;
    /**
     * 经办人姓名
     */
    private String operatorName;
    /**
     * 经办人身份证号码
     */
    private String operatorIdCard;
    /**
     * 经办人身份证照片：第一张正面 第二张反面 逗号拼接
     */
    private String operatorPic;
    /**
     * 其他资质图片 逗号拼接
     */
    private String aptitudePic;
    /**
     * 是否使用平台签名，0使用自定义，1使用乐信通，默认乐信通，2使用智惠信使
     */
    private Integer isPlatformSign;
    /**
     * 审核人id
     */
    private Long verifyUserId;
    /**
     * 签名审核状态，1 已提交 2 驳回 3 通过
     */
    private Integer signVerifyStatus;
    /**
     * 签名审核内容
     */
    private String signVerifyRemark;
    /**
     * 签名审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime signVerifyTime;
    // 新增全参构造方法
    public GetSignModel(Customer customer) {
        this.phone=customer.getPhone();
        this.customerId = customer.getCustomerId();
        this.sign = customer.getSign();
        this.signVerify = customer.getSignVerify();
        this.compName = customer.getCompName();
        this.creditCode = customer.getCreditCode();
        this.signPic = customer.getSignPic();
        this.legalPersonName = customer.getLegalPersonName();
        this.legalPersonIdCard = customer.getLegalPersonIdCard();
        this.operatorName = customer.getOperatorName();
        this.operatorIdCard = customer.getOperatorIdCard();
        this.operatorPic = customer.getOperatorPic();
        this.aptitudePic = customer.getAptitudePic();
        this.isPlatformSign = customer.getIsPlatformSign();
        this.verifyUserId = customer.getVerifyUserId();
        this.signVerifyStatus = customer.getSignVerifyStatus();
        this.signVerifyRemark = customer.getSignVerifyRemark();
        this.signVerifyTime = customer.getSignVerifyTime();
    }
}
